package com.project.webapp.action.backend;

import java.util.List;

import com.project.dao.bean.Organization;
import com.project.service.backend.IDemoService;
import com.project.webapp.action.BaseAction;
	
public class DemoAction extends BaseAction {

	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private IDemoService iDemoService;
	private Organization orgin;
	private List<Organization> orginlist;
	public String execute() throws Exception {
		orgin=new Organization();
		if(orginlist!=null&&orginlist.size()>0){
			orginlist.clear();
		}
		
		return this.query();
	}
	
	public String query(){
		try {
			System.out.println("我进入了查询方法！！");
			orginlist=iDemoService.demolist(orgin);
			System.out.println(orginlist.size()+"~~~~~~~~~~~~~~~~~~~");
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return SUCCESS;
	}
	public IDemoService getiDemoService() {
		return iDemoService;
	}
	public void setiDemoService(IDemoService iDemoService) {
		this.iDemoService = iDemoService;
	}
	public Organization getOrgin() {
		return orgin;
	}
	public void setOrgin(Organization orgin) {
		this.orgin = orgin;
	}
	public List<Organization> getOrginlist() {
		return orginlist;
	}
	public void setOrginlist(List<Organization> orginlist) {
		this.orginlist = orginlist;
	}
	
	
	
	
}
